package com.ruoyi.system.api.factory;

import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.core.web.domain.AjaxResult;
import com.ruoyi.system.api.RemoteYLService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;



@Component
public class RemoteYlFallbackFactory implements FallbackFactory<RemoteYLService> {
    private static final Logger log = LoggerFactory.getLogger(RemoteYlFallbackFactory.class);


    @Override
    public RemoteYLService create(Throwable cause) {
        return new RemoteYLService() {
            @Override
            public R<AjaxResult> reviewTrue(String orderNo, String source) {
                return R.fail("审核通过失败:" + cause.getMessage());
            }

            @Override
            public R<AjaxResult> reviewFalse(String orderNo,String reviewStatusDesc, String source) {
                return R.fail("审核驳回失败:" + cause.getMessage());
            }
        };


    }
}
